package com.simplecontact.classes;

import android.os.Parcel;
import android.os.Parcelable;

public class CalendarBundle implements Parcelable{

	private int mId;
	private long mDateTime;
	private String mContent;
	private String mUrlMusic;	
	
	
	/**
	 * This method return Id of an object calendar
     * <P>Return type: int</P>
     */
	public int getId(){
		return mId;
	}
	
	/**
	 * This method return DateTime of an object calendar
     * <P>Return type: long</P>
     */
	public long getDateTime(){
		return mDateTime;
	}
	
	/**
	 * This method return Content of an object calendar
     * <P>Return type: String</P>
     */
	public String getContent(){
		return mContent;
	}		
	
	/**
	 * This method return UrlMusic of an object calendar
     * <P>Return type: String</P>
     */
	public String getUrlMusic(){
		return mUrlMusic;
	}		
	
	
	/**
	 * Default constructor of CalendarBundle class   
     */
	public CalendarBundle(){
		mId = -1;
		mDateTime = -1;
		mContent = "";
		mUrlMusic = "";		
	}
	
	/**
	 * Full constructor of CalendarBundle class   
     */
	public CalendarBundle(int pId, long pDateTime, String pContent, String pUrlMusic){
		mId = pId;
		mDateTime = pDateTime;
		mContent = pContent;		
		mUrlMusic = pUrlMusic;		
	}	
	
	/**
	 * Object constructor of CalendarBundle class   
     */
	public CalendarBundle(CalendarBundle cb){
		mId = cb.getId();
		mDateTime = cb.getDateTime();
		mContent = cb.getContent();
		mUrlMusic = cb.getUrlMusic();		
	}

	/**
	 * Parcel constructor of CalendarBundle class   
     */	
	public CalendarBundle(Parcel p){
		mId = p.readInt();
		mDateTime = p.readLong();
		mContent = p.readString();
		mUrlMusic = p.readString();		
	}
	
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeInt(mId);
		dest.writeLong(mDateTime);
		dest.writeString(mContent);
		dest.writeString(mUrlMusic);		
	}
	public static final Parcelable.Creator<CalendarBundle> CREATOR = new Creator<CalendarBundle>() {
		
		@Override
		public CalendarBundle[] newArray(int size) {
			return new CalendarBundle[size];
		}
		
		@Override
		public CalendarBundle createFromParcel(Parcel source) {
	          return new CalendarBundle(source);
		}
	};
}
